#include <bits/stdc++.h>
#define int long long
using namespace std;
int read() {
	int x(0),f(0);
	char ch=getchar();
	while(!isdigit(ch)) f|=(ch=='-'),ch=getchar();
	while(isdigit(ch)) x=x*10+ch-'0',ch=getchar();
	return f?-x:x;
}
const int N=200005;
int n,a[N],m;
namespace bl {
	int dp[N][2],sum[N];
	void work() {
		while(m--) {
			a[n]=read();
			for(int i=1;i<=n;++i) sum[i]=sum[i-1]+a[i];
			for(int i=1;i<=n;++i) dp[i][0]=dp[i][1]=1e18;
			dp[2][1]=a[2]-a[1];
			for(int i=3;i<=n;++i)
				for(int j=0;j<=1;++j)
					for(int k=2;k<i;++k)
						if(dp[k][j^1]!=1e18)
							dp[i][j]=min(dp[i][j],a[i]-dp[k][j^1]-(sum[i-1]-sum[k]));
			printf("%lld\n",max(dp[n][0],-dp[n][1]));
		}
		exit(0);
	}
}
signed main() {
	freopen("pockets.in","r",stdin);
	freopen("pockets.out","w",stdout);
	n=read();
	for(int i=1;i<n;++i) a[i]=read();
	m=read();
	bl::work();
	return 0;
}
/*
5
1 3 4 2
4
3
5
10
15

1
-1
2
7

10
3 1 4 1 5 9 2 6 5
6
3
6
9
180
15
31

5
6
3
150
5
3
*/
